package com;

import java.util.ArrayList;
import java.util.Scanner;

public class add {
    public static void add(ArrayList<student> st){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生的姓名");
        String name = sc.next();
        System.out.println("请输入学生的id");
        String id = sc.next();
        System.out.println("请输入学生的年龄");
        int age = sc.nextInt();
        student st1 = new student(id,name,age);
        st.add(st1);

    }
}
